package com.young.springdemo.service.commandchain;

public class Director extends Approve {

    public Director(String name ) {
        super(name);
    }

    public void processRequest(PurchaseRequest request){
        if (request.getPrice() <= 100 ){
            System.out.println(this.name + "开始处理价格为:"+request.getPrice()+"的商品:"+request.getGoodsName());
        }else {
            this.success.processRequest(request);
        }
    }
}
